<?php 
namespace app\ctrl;
class indexCtrl extends \php_frame\php_frame{
	public function action(){
		p('action');
		$model = new \core\lib\model();
		$sql = "select * from code";
		$ret = $model->query($sql);
		p($ret->fetchAll());
	}

	public function index(){
		// $model = new \app\model\codeModel();
		// $data = $model->lists();
		// $data = $model->getOne(1);
		// dump($data);

		$data = 'Hello World';
		$title = '视图文件';
		//看看自动加载类库详情
		p(self::$classMap);
		$this->assign('data',$data);
		$this->assign('title',$title);
		// $this->display('index/index.html');
		// $this->display('index/twig.html');
		$this->display('index.html');
	}
}